<ul class="uk-grid uk-grid-collapse uk-child-width-expand dux-tabs">
    <li class="{$type == 0 ? 'active' : 0}">
        <a href="{url('')}">全部</a>
    </li>
    <li class="{$type == 1 ? 'active' : 0}">
        <a href="{url('', ['type' => 1])}">未使用</a>
    </li>
    <li class="{$type == 2 ? 'active' : 0}">
        <a href="{url('', ['type' => 2])}">已过期</a>
    </li>
</ul>

<main class="dux-main">
    <div data-dux="page-ajaxPage" data-list="#list" data-tpl="#list-tpl" data-url='{url("ajax", $pageParams)}'data-page="1">
        <ul class="dux-coupon-list" id="list">
        </ul>
        </div>
</main>


<script type="text/html" id="list-tpl">
    {{# for(var i = 0, len = d.length; i < len; i++){ }}

    <li id="item-{$vo.log_id}">

        <a href="{{d[i].url}}" class="dux-coupon-box {{d[i].overdue ? 'dux-coupon-failure' : '' }}">

            <div class="info">
                <div class="price">
                    ￥{{d[i].money}} <small>满{{d[i].meet_money}}可用</small>
                </div>
                <div class="name">
                    {{d[i].name}}
                </div>
            </div>
            <div class="date">
                {{# if(d[i].overdue){ }}
                <div class="failure">已失效</div>
                {{# }else { }}

                <div class="tip">有效期</div>
                {{app.date('Y-m-d', d[i].start_time)}}
                <br>
                -
                <br>
                {{app.date('Y-m-d', d[i].end_time)}}

                {{# } }}
            </div>
            <div class="icon fa fa-angle-right"></div>
        </a>
    </li>

    {{# } }}
</script>

